home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / vc / pro15 / snipit.prg < prev   
Encoding:
Text File  |  1993-03-10  |  20.5 KB  |  488 lines

  1. *  ┌───────────────────────────────────────────────────────────────────────┐
  2. * ▌│                                                                       │
  3. * ▌│   Function: parse_code()                                              │
  4. * ▌│   Purpose : WordPerfect codes added                                   │
  5. * ▌│   Usage   :                                                           │
  6. * ▌│                                                                       │
  7. * ▌│   Author  : Copyright (C) 1992, LumiNet Publishing Corporation        │
  8. * ▌│                                 All Rights Reserved.                  │
  9. * ▌│                                                                       │
  10. * ▌│   Comments: Required linked libraries include:                        │
  11. * ▌│                CLP2WPC.LIB                                            │
  12. * ▌│                                                                       │
  13. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  14. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  15. *-------------------------------------------------------------------------*
  16. * Translate the WPC code                
  17. * Objective........Convert the WordPerfect text & document formatting
  18. *                  codes that appear in a memo field into their actual
  19. *                  WordPerfect equivalent.
  20. * Arguments........The entire code value is passed, which includes user
  21. *                  defined paramaters, such as # of inches within a
  22. *                  left and right margin. 
  23. * Returns..........nothing
  24. * Translation......Uses the docMAKER(tm) toolkit library of routines to
  25. *                  transform user formatting requests into a 
  26. *                  WordPerfect compatable document.
  27. *-------------------------------------------------------------------------*
  28.  
  29.  
  30. Function Parse_code
  31. Parameters codefound
  32.  
  33. private mark, wpcval, wpcval2, wpcval3, wpcval4, comma
  34.  
  35.  
  36. DO CASE
  37.  
  38. *  ┌───────────────────────────────────────────────────────────────────────┐
  39. * ▌│ Left / Right Margins                                                  │
  40. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  41. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  42.     CASE "LRMARG|" $ codefound  
  43.         mark = AT("|", codefound)
  44.         If mark > 0
  45.             comma = AT(",", codefound)
  46.             If comma > 0
  47.                 wpcval = VAL(Substr(codefound, mark + 1, comma - mark - 1)) * 1200
  48.                 wpcval2 = VAL(Substr(codefound, comma + 1)) * 1200
  49.                 If wpcval > 0 .and. wpcval2 > 0
  50.                     WpLRMarg(wpcval, wpcval2)        
  51.                 Endif
  52.             Endif
  53.         Endif
  54.     
  55. *  ┌───────────────────────────────────────────────────────────────────────┐
  56. * ▌│ Top / Bottom Margins                                                  │
  57. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  58. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  59.     CASE "TBMARG|" $ codefound  
  60.         mark = AT("|", codefound)
  61.         If mark > 0
  62.             comma = AT(",", codefound)
  63.             If comma > 0
  64.                 wpcval = VAL(Substr(codefound, mark + 1, comma - mark - 1)) * 1200
  65.                 wpcval2 = VAL(Substr(codefound, comma + 1)) * 1200
  66.                 If wpcval > 0 .and. wpcval2 > 0
  67.                     WpTBMarg(wpcval, wpcval2)        
  68.                 Endif
  69.             Endif
  70.         Endif
  71.     
  72. *  ┌───────────────────────────────────────────────────────────────────────┐
  73. * ▌│ Page Numbering Position                                               │
  74. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  75. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  76.     CASE "PAGENO|" $ codefound  
  77.         mark = AT("|", codefound)
  78.         If mark > 0
  79.             mark=mark+1
  80.             wpcval  = VAL(Alltrim(SUBSTR(codefound, mark)))
  81.             If wpcval > 0
  82.                 WpHPAGE(wpcval)
  83.             Endif
  84.         Endif
  85.     
  86. *  ┌───────────────────────────────────────────────────────────────────────┐
  87. * ▌│ Justification                                                         │
  88. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  89. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  90.     CASE "JUST|"   $ codefound  
  91.         mark = AT("|", codefound)
  92.         If mark > 0
  93.             mark=mark+1
  94.             wpcval  = VAL(Alltrim(SUBSTR(codefound, mark)))
  95.             If wpcval > 0
  96.                 WpJUST(wpcval)
  97.             Endif
  98.         Endif
  99.  
  100. *  ┌───────────────────────────────────────────────────────────────────────┐
  101. * ▌│ Horizontal Line                                                       │
  102. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  103. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  104.     CASE "HOR|"    $ codefound   
  105.         mark = AT("|", codefound)
  106.         If mark > 0
  107.             commafir = 0
  108.             commasec = ATNEXT(",", codefound,1)
  109.             If commasec > 0
  110.                 wpcval1 = VAL(Substr(codefound, mark + 1, commasec - mark - 1)) 
  111.                 wpcval2 = VAL(Substr(codefound, commasec+1,1)) 
  112.                 wpcval3 = VAL(Substr(codefound, AtNext(",", codefound,2)+1,1)) 
  113.                 wpcval4 = VAL(Substr(codefound, AtNext(",", codefound,3)+1, AtNext(",",codefound,4)-AtNext(",",codefound,3)-1)) 
  114.                 wpcval5 = VAL(Substr(codefound, AtNext(",", codefound,4)+1, AtNext(",",codefound,5)-AtNext(",",codefound,4)-1)) 
  115.                 wpcval6 = VAL(Substr(codefound, AtNext(",", codefound,5)+1)) 
  116.                 WpHLine(wpcval1, wpcval2, wpcval3, wpcval4, wpcval5, wpcval6)        
  117.             Endif
  118.         Endif
  119.  
  120.  
  121. *  ┌───────────────────────────────────────────────────────────────────────┐
  122. * ▌│ Vertical Line                                                         │
  123. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  124. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  125.     CASE "VER|"    $ codefound  
  126.         mark = AT("|", codefound)
  127.         If mark > 0
  128.             commafir = 0
  129.             commasec = ATNEXT(",", codefound,1)
  130.             If commasec > 0
  131.                 wpcval1 = VAL(Substr(codefound, mark + 1, commasec - mark - 1)) 
  132.                 wpcval2 = VAL(Substr(codefound, commasec+1,1)) 
  133.                 wpcval3 = VAL(Substr(codefound, AtNext(",", codefound,2)+1,1)) 
  134.                 wpcval4 = VAL(Substr(codefound, AtNext(",", codefound,3)+1, AtNext(",",codefound,4)-AtNext(",",codefound,3)-1)) 
  135.                 wpcval5 = VAL(Substr(codefound, AtNext(",", codefound,4)+1, AtNext(",",codefound,5)-AtNext(",",codefound,4)-1)) 
  136.                 wpcval6 = VAL(Substr(codefound, AtNext(",", codefound,5)+1)) 
  137.                 WpVLine(wpcval1, wpcval2, wpcval3, wpcval4, wpcval5, wpcval6)        
  138.             Endif
  139.         Endif
  140.  
  141. *  ┌───────────────────────────────────────────────────────────────────────┐
  142. * ▌│ Bold  (On)  (Off)                                                     │
  143. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  144. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  145.     CASE "BOLD|ON" $ codefound  
  146.         WpAttOn(Bold)
  147.  
  148.     CASE "BOLD|OFF" $ codefound 
  149.         WpAttOff(Bold)
  150.  
  151. *  ┌───────────────────────────────────────────────────────────────────────┐
  152. * ▌│ Line Centering                                                        │
  153. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  154. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  155.     CASE "CENTER" $ codefound
  156.         WpCntr()
  157.  
  158. *  ┌───────────────────────────────────────────────────────────────────────┐
  159. * ▌│ Double Underline  (On)  (Off)                                         │
  160. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  161. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  162.     CASE "DBLUND|ON" $ codefound 
  163.         WpAttOn(Dbl_under)
  164.         
  165.     CASE "DBLUND|OFF" $ codefound 
  166.         WpAttOff(Dbl_under)
  167.  
  168. *  ┌───────────────────────────────────────────────────────────────────────┐
  169. * ▌│ Strikeout   (On)  (Off)                                               │
  170. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  171. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  172.     CASE "STRIKE|ON" $ codefound 
  173.         WpAttOn(Strike_out)
  174.         
  175.     CASE "STRIKE|OFF" $ codefound 
  176.         WpAttOff(Strike_out)
  177.         
  178. *  ┌───────────────────────────────────────────────────────────────────────┐
  179. * ▌│ Extra Large   (On)   (Off)                                            │
  180. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  181. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  182.     CASE "EXLRG|ON" $ codefound 
  183.         WpAttOn(Extra_large)
  184.  
  185.     CASE "EXLRG|OFF" $ codefound 
  186.         WpattOff(Extra_large)
  187.  
  188. *  ┌───────────────────────────────────────────────────────────────────────┐
  189. * ▌│ Very Large   (On)   (Off)                                             │
  190. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  191. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  192.     CASE "VLARGE|ON" $ codefound 
  193.         WpAttOn(Very_large)
  194.  
  195.     CASE "VLARGE|OFF" $ codefound 
  196.         WpattOff(Very_large)
  197.  
  198. *  ┌───────────────────────────────────────────────────────────────────────┐
  199. * ▌│ Fine  (On)  (Off)                                                     │
  200. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  201. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  202.     CASE "FINE|ON" $ codefound 
  203.         WpattOn(Fine)
  204.  
  205.     CASE "FINE|OFF" $ codefound 
  206.         WpattOff(Fine)
  207.  
  208. *  ┌───────────────────────────────────────────────────────────────────────┐
  209. * ▌│ Hard Page Return                                                      │
  210. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  211. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  212.     CASE "HARDPAGE|" $ codefound 
  213.         mark = AT("|", codefound)
  214.         If mark > 0
  215.             mark=mark+1
  216.             wpcval  = VAL(Alltrim(SUBSTR(codefound, mark)))
  217.             If wpcval > 0
  218.                 WpHPAGE(wpcval)
  219.             Endif
  220.         Endif
  221.  
  222. *  ┌───────────────────────────────────────────────────────────────────────┐
  223. * ▌│ Hard Line Return                                                      │
  224. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  225. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  226.     CASE "HR|" $ codefound 
  227.         mark = AT("|", codefound)
  228.         If mark > 0
  229.             mark=mark+1
  230.             wpcval  = VAL(Alltrim(SUBSTR(codefound, mark)))
  231.             If wpcval > 0
  232.                 WpHRTN(wpcval)
  233.             Endif
  234.         Endif
  235.                     
  236.  
  237. *  ┌───────────────────────────────────────────────────────────────────────┐
  238. * ▌│ Indent                                                                │
  239. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  240. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  241.     CASE "INDENT|" $ codefound 
  242.         mark = AT("|", codefound)
  243.         If mark > 0
  244.             mark=mark+1
  245.             wpcval  = VAL(Alltrim(SUBSTR(codefound, mark)))
  246.             If wpcval > 0
  247.                 WpINDENT(wpcval)
  248.             Endif
  249.         Endif
  250.  
  251. *  ┌───────────────────────────────────────────────────────────────────────┐
  252. * ▌│ Italics   (On)   (Off)                                                │
  253. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  254. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  255.     CASE "ITALIC|ON" $ codefound 
  256.         WpAttOn(Italics)
  257.  
  258.     CASE "ITALIC|OFF" $ codefound 
  259.         WpAttOff(Italics)
  260.  
  261. *  ┌───────────────────────────────────────────────────────────────────────┐
  262. * ▌│ Large (On)  (Off)                                                     │
  263. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  264. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  265.     CASE "LARGE|ON" $ codefound 
  266.         WpAttOn(Large)
  267.  
  268.     CASE "LARGE|OFF" $ codefound 
  269.         WpAttOff(Large)
  270.  
  271. *  ┌───────────────────────────────────────────────────────────────────────┐
  272. * ▌│ Outline   (On)   (Off)                                                │
  273. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  274. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  275.     CASE "OUTLN|ON" $ codefound 
  276.         WpAttOn(Outline)
  277.  
  278.     CASE "OUTLN|OFF" $ codefound 
  279.         WpAttOff(Outline)
  280.  
  281. *  ┌───────────────────────────────────────────────────────────────────────┐
  282. * ▌│ Redline   (On)    (Off)                                               │
  283. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  284. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  285.     CASE "REDLN|ON" $ codefound 
  286.         WpAttOn(Redline)
  287.  
  288.     CASE "REDLN|OFF" $ codefound 
  289.         WpAttOff(Redline)
  290.  
  291. *  ┌───────────────────────────────────────────────────────────────────────┐
  292. * ▌│ Shadow   (On)    (Off)                                                │
  293. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  294. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  295.     CASE "SHAD|ON" $ codefound 
  296.         WpAttOn(Shadow)
  297.  
  298.     CASE "SHAD|OFF" $ codefound 
  299.         WpAttOff(Shadow)
  300.  
  301. *  ┌───────────────────────────────────────────────────────────────────────┐
  302. * ▌│ Small (On)  (Off)                                                     │
  303. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  304. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  305.     CASE "SMALL|ON" $ codefound 
  306.         WpAttOn(Small)
  307.  
  308.     CASE "SMALL|OFF" $ codefound 
  309.         WpAttOff(Small)
  310.  
  311. *  ┌───────────────────────────────────────────────────────────────────────┐
  312. * ▌│ Small Caps  (On)   (Off)                                              │
  313. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  314. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  315.     CASE "SMCAP|ON" $ codefound 
  316.         WpAttOn(Small_caps)
  317.  
  318.     CASE "SMCAP|OFF" $ codefound 
  319.         WpAttOff(Small_caps)
  320.  
  321. *  ┌───────────────────────────────────────────────────────────────────────┐
  322. * ▌│ Soft Return  (On)   (Off)                                             │
  323. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  324. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  325.     CASE "SOFT|ON" $ codefound 
  326.         softon=.T.
  327.  
  328.     CASE "SOFT|OFF" $ codefound 
  329.         softon=.F.
  330.  
  331. *  ┌───────────────────────────────────────────────────────────────────────┐
  332. * ▌│ Subscript   (On)   (Off)                                              │
  333. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  334. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  335.     CASE "SUBSC|ON" $ codefound 
  336.         WpAttOn(Subscript)
  337.  
  338.     CASE "SUBSC|OFF" $ codefound 
  339.         WpAttOff(Subscript)
  340.         
  341. *  ┌───────────────────────────────────────────────────────────────────────┐
  342. * ▌│ Superscript  (On)   (Off)                                             │
  343. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  344. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  345.     CASE "SUPSC|ON" $ codefound 
  346.         WpAttOn(Superscript)
  347.  
  348.     CASE "SUPSC|OFF" $ codefound 
  349.         WpAttOff(Superscript)
  350.  
  351. *  ┌───────────────────────────────────────────────────────────────────────┐
  352. * ▌│ Underline   (On)   (Off)                                              │
  353. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  354. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  355.     CASE "UNDLN|ON" $ codefound 
  356.         WpAttOn(Underline)
  357.  
  358.     CASE "UNDLN|OFF" $ codefound 
  359.         WpAttOff(Underline)
  360.  
  361. *  ┌───────────────────────────────────────────────────────────────────────┐
  362. * ▌│ Tab                                                                   │
  363. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  364. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  365.     CASE "TAB|" $ codefound 
  366.         mark = AT("|", codefound)
  367.         If mark > 0
  368.             mark=mark+1
  369.             wpcval  = Max (VAL(Alltrim(SUBSTR(codefound, mark))), 1)
  370.             If wpcval > 0
  371.                 wptab(wpcval)
  372.             Endif
  373.         Endif
  374.  
  375. *  ┌───────────────────────────────────────────────────────────────────────┐
  376. * ▌│ System Date and Time                                                  │
  377. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  378. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  379.     CASE "SDATE|" $ codefound 
  380.         mark = AT("|", codefound)
  381.         If mark > 0
  382.             mark=mark+1
  383.             wpcval  = Alltrim(SUBSTR(codefound, mark))
  384.             If !Empty(wpcval)
  385.                 WpDATE(wpcval)
  386.             Endif
  387.         Endif
  388.  
  389. *  ┌───────────────────────────────────────────────────────────────────────┐
  390. * ▌│ Set Tabs (maximum of 6 settings)                                      │
  391. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  392. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  393.     CASE "SETTAB|" $ codefound  
  394.         mark = AT("|", codefound)
  395.         If mark > 0
  396.             commafir = 0
  397.             commasec = ATNEXT(",", codefound,1)
  398.             If commasec > 0
  399.                 wpcval1 = VAL(Substr(codefound, mark + 1, commasec - mark - 1)) 
  400.                 wpcval2 = VAL(Substr(codefound, commasec+1,1)) 
  401.                 wpcval3 = VAL(Substr(codefound, AtNext(",", codefound,2)+1,1)) 
  402.                 wpcval4 = VAL(Substr(codefound, AtNext(",", codefound,3)+1, AtNext(",",codefound,4)-AtNext(",",codefound,3)-1)) 
  403.                 wpcval5 = VAL(Substr(codefound, AtNext(",", codefound,4)+1, AtNext(",",codefound,5)-AtNext(",",codefound,4)-1)) 
  404.                 wpcval6 = VAL(Substr(codefound, AtNext(",", codefound,5)+1, AtNext(",",codefound,6)-AtNext(",",codefound,5)-1)) 
  405.                 wpcval7 = VAL(Substr(codefound, AtNext(",", codefound,6)+1, AtNext(",",codefound,7)-AtNext(",",codefound,6)-1)) 
  406.                 wpcval8 = VAL(Substr(codefound, AtNext(",", codefound,7)+1, AtNext(",",codefound,8)-AtNext(",",codefound,7)-1)) 
  407.                 wpcval9 = VAL(Substr(codefound, AtNext(",", codefound,8)+1, AtNext(",",codefound,9)-AtNext(",",codefound,8)-1)) 
  408.                 wpcval0 = VAL(Substr(codefound, AtNext(",", codefound,9)+1)) 
  409.                 WpSetTab(wpcval1, wpcval2, wpcval3, wpcval4, wpcval5, wpcval6, wpcval7, wpcval8, wpcval9, wpcval0)        
  410.             Endif
  411.         Endif
  412.  
  413.  
  414. *  ┌───────────────────────────────────────────────────────────────────────┐
  415. * ▌│ Figure Graphics                                                       │
  416. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  417. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  418.     CASE "FIGGR|" $ codefound  
  419.         mark = AT("|", codefound)
  420.         If mark > 0
  421.             commafir = 0
  422.             commasec = ATNEXT(",", codefound,1)
  423.             If commasec > 0
  424.                 wpcval1 =Substr(codefound, mark + 1, commasec - mark - 1)
  425.                 wpcval2 = Substr(codefound, commasec+1,1)
  426.                 wpcval2 = val(wpcval2)
  427.                 wpcval3 = Substr(codefound, AtNext(",", codefound,2)+1,1)
  428.                 wpcval3 = val(wpcval3)
  429.                 wpcval4 = Substr(codefound, AtNext(",", codefound,3)+1, AtNext(",",codefound,4)-AtNext(",",codefound,3)-1)
  430.                 wpcval4 = Val(wpcval4)
  431.                 wpcval5 = Substr(codefound, AtNext(",", codefound,4)+1, AtNext(",",codefound,5)-AtNext(",",codefound,4)-1)
  432.                 wpcval5 = val(wpcval5)
  433.                 wpcval6 = Substr(codefound, AtNext(",", codefound,5)+1)
  434.                 wpcval6 = val(wpcval6)
  435.                 WpFig(wpcval1, wpcval2, wpcval3, wpcval4, wpcval5, wpcval6)        
  436.             Endif
  437.         Endif
  438.     
  439. *  ┌───────────────────────────────────────────────────────────────────────┐
  440. * ▌│ Newspaper Columns   (On)   (Off)                                      │
  441. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  442. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  443.     CASE "NEWCOL|ON" $ codefound 
  444.         WpClmOn()
  445.  
  446.     CASE "NEWCOL|OFF" $ codefound 
  447.         WpClmOff()
  448.  
  449.  
  450. *  ┌───────────────────────────────────────────────────────────────────────┐
  451. * ▌│ Font change                                                           │
  452. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  453. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  454.     CASE "FNTCHG|" $ codefound 
  455.         mark = AT("|", codefound)
  456.         If mark > 0
  457.             mark=mark+1
  458.             wpcval  = Max (VAL(Alltrim(SUBSTR(codefound, mark))), 1)
  459.             If wpcval > 0
  460.                 wpfont(wpcval)
  461.             Endif
  462.         Endif
  463.  
  464.  
  465. *  ┌───────────────────────────────────────────────────────────────────────┐
  466. * ▌│ Header A/B Footer A/B  (On)   (Off)                                   │
  467. * ▌└───────────────────────────────────────────────────────────────────────┘ 
  468. * ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  469.     CASE "H/FSTART|" $ codefound 
  470.         mark = AT("|", codefound)
  471.         If mark > 0
  472.             commafir = 0
  473.             commasec = ATNEXT(",", codefound,1)
  474.             If commasec > 0
  475.                 wpcval1 = VAL(Substr(codefound, mark + 1, commasec - mark - 1)) 
  476.                 wpcval2 = VAL(Substr(codefound, commasec+1,1)) 
  477.                 Wphfstrt(wpcval1, wpcval2)        
  478.             Endif
  479.         Endif
  480.  
  481.     CASE "H/FEND|" $ codefound 
  482.         WpHfend()
  483.  
  484.     
  485. ENDCASE
  486.  
  487. Return(.t.)
  488.